<%- model_class = Client -%>
<div id="sort_direction" style="display: none;"><%= params[:direction] %></div>
<%= hidden_field_tag :direction, params[:direction] %>
<%= hidden_field_tag :sort, params[:sort] %>
<div class="clients">
  <div class="content_top">
    <div class="primary_heading">
      <h1>
        <%= t '.title', :default => t("clients") %>
        <span>&nbsp;/&nbsp;<%= t('views.common.active') %></span>
      </h1>
    </div>
    <div class="primary_btn">
      <%= link_to (content_tag(:span, t("header.links.clients.new"))),
                  new_client_path,
                  :class => 'btn_large' %>
    </div>
  </div>
  <!--content_top-->
  <%= form_tag "clients/bulk_actions", {method: :get, :remote => true} do -%>
      <div class="content_middle">

        <div class="grid_control">
          <div class="grid_control_left">
            <ul value='<%= model_class.model_name %>' id="bulk_actions">
              <%= render "bulk_actions" %>
            </ul>
          </div>
          <div class="grid_control_right" id="active_links">
            <%= render 'clients/filter_links' %>
          </div>

        </div>
        <!--grid_control-->
        <div class="grid_table">
          <table cellpadding="0" cellspacing="0" class="table table_listing client_listing <%= I18n.locale %>">
            <colgroup>
              <col class="one"/>
              <col class="two"/>
              <col class="three"/>
              <col class="four"/>
              <col class="five"/>
              <col class="six"/>
              <col class="seven"/>
            </colgroup>
            <thead  id="client_head">
            <%= render 'client_header' %>
            </thead>
            <tbody id="client_body">
            <%= render 'clients' %>
            <tfoot id="paging_links">
            <%= render "application_partials/paging" %>
            </tfoot>
            </tbody>
          </table>
        </div>
        <!--grid_table-->
      </div>
      <!--content_middle-->
      <div class="content_bottom">
        <%= link_to (content_tag(:span, t("header.links.clients.new"))),
                    new_client_path,
                    :class => 'btn_large' %>
      </div>
      <!--content_bottom-->
      </div><!--clients-->
  <% end %>

  <%= render 'payments/unpaid_invoices' %>

